Skip to content

Python: Ignore non-project workspace glob matches - #7509

Open
Luis Rodriguez (luisangelrod) wants to merge 2 commits into
microsoft:mainfrom
luisangelrod:luisangelrod-7508
Open

Python: Ignore non-project workspace glob matches#7509
Luis Rodriguez (luisangelrod) wants to merge 2 commits into
microsoft:mainfrom
luisangelrod:luisangelrod-7508

Conversation

@luisangelrod

Copy link
Copy Markdown

Motivation & Context

Workspace project discovery currently treats every directory matched by packages/* as a project. After a package is removed or moved, a stale local directory can remain without a pyproject.toml, causing contributor commands such as uv run poe syntax to fail with FileNotFoundError.

Description & Review Guide

  • What are the major changes? Filter globbed workspace members to paths that contain a pyproject.toml, and add a regression test with valid and stale package directories.
  • What is the impact of these changes? Workspace task commands skip non-project glob matches while preserving explicit workspace-member behavior.
  • What do you want reviewers to focus on? Whether filtering at shared project discovery is the right scope for all workspace task consumers.

Related Issue

Fixes #7508

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Python workspace task utilities to avoid treating stale packages/* directories (without a pyproject.toml) as workspace projects, preventing FileNotFoundError failures during workspace-wide task execution.

Changes:

  • Filter glob-expanded workspace members to only include paths that contain a pyproject.toml.
  • Add a regression test covering a valid package directory alongside a stale directory match.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
python/scripts/task_runner.py Filters globbed workspace member matches to only include directories that have a pyproject.toml.
python/scripts/tests/test_task_runner.py Adds a regression test for ignoring stale glob matches without pyproject.toml.

Comment thread python/scripts/tests/test_task_runner.py
@luisangelrod

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL44671410490% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
9132 34 💤 0 ❌ 0 🔥 2m 21s ⏱️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: poe syntax fails with FileNotFoundError for azurefunctions/pyproject.toml

2 participants